Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5206

Parser allows MERGE with mismatched parentheses

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.31.0
    • None
    • None

    Description

      The SQL parser allows invalid MERGE statements with mismatched parentheses. For example, the following invalid statement is treated as valid but is missing a trailing ')':

      merge into emps as e
      using temps as t on e.empno = t.empno
      when not matched
      then insert (a, b) (values (1, 2);
      

      And the following invalid statement is treated as valid but has an unmatched trailing ')':

      merge into emps as e
      using temps as t on e.empno = t.empno
      when not matched
      then insert (a, b) values (1, 2));
      

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: